package com.baizhi.hospital.controller;

import com.baizhi.hospital.annotation.LogAnnotation;
import com.baizhi.hospital.entity.Exam;
import com.baizhi.hospital.service.ExamService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/exam")
public class ExamController {

	@Resource
	private ExamService examService;


	@RequestMapping("/insertExam")
	@LogAnnotation(value = "添加审核记录",type = 2)
	public Map<String,Object> insertExam(Exam exam){
		return examService.insertExam(exam);
	}


	@RequestMapping("/selectExamPage")
	@LogAnnotation(value = "查看提交的审核记录",type = 2)
	public Map<String ,Object> selectExamPage(int page,int limit,String name){
		return examService.selectExamPage(page, limit, name);
	}


	@RequestMapping("/updateExam")
	@LogAnnotation(value = "审核药品",type = 2)
	public Map<String,Object> updateExam(Exam exam){
		return examService.updateExam(exam);
	}
}
